<template>
  <div>
    <el-table :data="data" style="width: 100%" border @row-click="rowClick">
      <el-table-column prop="projectCode" label="项目编号"> </el-table-column>
      <el-table-column prop="projectName" label="项目名称"> </el-table-column>
      <el-table-column prop="dtotals" label="总日报数"> </el-table-column>
      <el-table-column prop="mtotals" label="个人平均日报数"> </el-table-column>
    </el-table>
    <dailyCheck
      :show="show"
      @checkClose="checkClose"
      :title="title"
      :code="code"
    />
  </div>
</template>

<script>
/* 日报表 */
import dailyCheck from "./dailyCheck.vue";
export default {
  props: ["data"],
  components: {
    dailyCheck,
  },
  data() {
    return {
      show: false,
      title: "",
      code: "",
    };
  },
  watch: {},
  methods: {
    rowClick(e) {
      this.code = e.projectCode;
      this.show = true;
      this.title = "查看日报";
    },
    checkClose(e) {
      if (e) {
        this.show = false;
        this.code = "";
      }
    },
  },
};
</script>

<style>
</style>